/********************************************************************************
 *      Copyright:  (C) 2025 LingYun IoT System Studio
 *                  All rights reserved.
 *
 *       Filename:  main.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(25/03/25)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "25/03/25 13:40:05"
 *                 
 ********************************************************************************/
#ifndef _MAIN_H_
#define _MIAN_H_

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <time.h>
#include <getopt.h>
#include <libgen.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/epoll.h>
#include <sys/resource.h>
#include <signal.h>

#include "logger.h"
#include "database.h"
#include "socket_server.h"
#include "usage_server.h"
#include "proc.h"

#define           MAX_EVENTS 512
#define           ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define MSG		  "Server has received the data"
#define PIDFILE   ".socketd_ser.pid"

int g_stop = 0;

void stop(int signum);

#endif

